using System;
using System.Collections.Generic;

namespace Zhao.Models.AppletDto
{
    /// <summary>
    /// 订单详情DTO
    /// </summary>
    public class OrderDetailDto
    {
        /// <summary>
        /// 订单ID
        /// </summary>
        public int OrderId { get; set; }

        /// <summary>
        /// 订单总金额
        /// </summary>
        public decimal TotalAmount { get; set; }

        /// <summary>
        /// 支付方式：1-余额支付，2-微信支付，3-支付宝支付
        /// </summary>
        public short? PaymentMethod { get; set; }

        /// <summary>
        /// 支付方式名称
        /// </summary>
        public string PaymentMethodName { get; set; }

        /// <summary>
        /// 支付时间
        /// </summary>
        public DateTime PaymentTime { get; set; }

        /// <summary>
        /// 订单创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// 订单状态：0-待支付，3-已支付，5-已完成，7-已取消
        /// </summary>
        public short OrderStatus { get; set; }

        /// <summary>
        /// 订单状态名称
        /// </summary>
        public string OrderStatusName { get; set; }

        /// <summary>
        /// 订单类型：7-场地预定，10-退款
        /// </summary>
        public short TypeId { get; set; }

        /// <summary>
        /// 订单类型名称
        /// </summary>
        public string TypeName { get; set; }

        /// <summary>
        /// 交易流水号
        /// </summary>
        public string TransactionID { get; set; }

        /// <summary>
        /// 用户姓名
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 用户手机号
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// 球馆ID
        /// </summary>
        public Guid VenueId { get; set; }

        /// <summary>
        /// 球馆名称
        /// </summary>
        public string VenueName { get; set; }

        /// <summary>
        /// 球馆地址
        /// </summary>
        public string VenueAddress { get; set; }

        /// <summary>
        /// 球馆客服电话
        /// </summary>
        public string VenuePhone { get; set; }

        /// <summary>
        /// 球馆图片
        /// </summary>
        public string VenueImage { get; set; }

        /// <summary>
        /// 预约日期
        /// </summary>
        public string DisplayDate { get; set; }

        /// <summary>
        /// 场地预约信息集合
        /// </summary>
        public List<AppointmentDetailInfo> Appointments { get; set; }

        /// <summary>
        /// 退款信息（如果有）
        /// </summary>
        public RefundInfo RefundInfo { get; set; }
    }

    /// <summary>
    /// 场地预约详细信息
    /// </summary>
    public class AppointmentDetailInfo
    {
        /// <summary>
        /// 预约ID
        /// </summary>
        public int AppointmentId { get; set; }

        /// <summary>
        /// 场地ID
        /// </summary>
        public int FieldId { get; set; }

        /// <summary>
        /// 场地名称
        /// </summary>
        public string FieldName { get; set; }

        /// <summary>
        /// 场地类型
        /// </summary>
        public string FieldType { get; set; }

        /// <summary>
        /// 预约日期
        /// </summary>
        public string DisplayDate { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public string StartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public string EndTime { get; set; }

        /// <summary>
        /// 预约状态：0-待支付，3-已预约，5-已完成，7-已取消
        /// </summary>
        public short Status { get; set; }

        /// <summary>
        /// 预约状态名称
        /// </summary>
        public string StatusName { get; set; }

        /// <summary>
        /// 预约价格
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// 预约人姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 预约人电话
        /// </summary>
        public string Mobile { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdatedAt { get; set; }
    }

    /// <summary>
    /// 退款信息
    /// </summary>
    public class RefundInfo
    {
        /// <summary>
        /// 退款订单ID
        /// </summary>
        public int RefundOrderId { get; set; }

        /// <summary>
        /// 退款金额
        /// </summary>
        public decimal RefundAmount { get; set; }

        /// <summary>
        /// 退款时间
        /// </summary>
        public DateTime RefundTime { get; set; }

        /// <summary>
        /// 退款交易流水号
        /// </summary>
        public string RefundTransactionId { get; set; }

        /// <summary>
        /// 退款状态
        /// </summary>
        public short Status { get; set; }

        /// <summary>
        /// 退款状态名称
        /// </summary>
        public string StatusName { get; set; }
    }
    
    /// <summary>
    /// 关联订单信息
    /// </summary>
    public class RelatedOrderInfo
    {
        /// <summary>
        /// 订单ID
        /// </summary>
        public int OrderId { get; set; }
        
        /// <summary>
        /// 订单类型
        /// </summary>
        public short TypeId { get; set; }
        
        /// <summary>
        /// 订单类型名称
        /// </summary>
        public string TypeName { get; set; }
        
        /// <summary>
        /// 订单金额
        /// </summary>
        public decimal Amount { get; set; }
        
        /// <summary>
        /// 订单状态
        /// </summary>
        public short Status { get; set; }
        
        /// <summary>
        /// 订单状态名称
        /// </summary>
        public string StatusName { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; }
        
        /// <summary>
        /// 交易流水号
        /// </summary>
        public string TransactionId { get; set; }
        
        /// <summary>
        /// 关系描述
        /// </summary>
        public string RelationDescription { get; set; }
    }
} 